package cn.topcodes.tcsf.wechat.domain.form;

import cn.topcodes.tcsf.admin.commons.domain.Idable;
import lombok.Data;
import java.util.Date;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotNull;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 微信消息表单
 * @author unicorn
 * @date 2017-08-17 15:51:48
 */
@Data
public class WechatMessageForm implements Idable {
	
	private Long id;

	@NotNull(message = "目标不能为空")
	@Length(min = 0,max = 100,message = "目标长度为0~100个字符")
	private String toUserName;
	
	@NotNull(message = "来源不能为空")
	@Length(min = 0,max = 100,message = "来源长度为0~100个字符")
	private String fromUserName;
	
	@NotNull(message = "时间不能为空")
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	private Date time;
	
	@NotNull(message = "类型不能为空")
	@Length(min = 0,max = 45,message = "类型长度为0~45个字符")
	private String msgType;
	
	@NotNull(message = "消息ID不能为空")
	private Long msgId;
	
	@Length(min = 0,max = 1000,message = "内容长度为0~1000个字符")
	private String content;
	
	@Length(min = 0,max = 1000,message = "图片长度为0~1000个字符")
	private String picUrl;
	
	@Length(min = 0,max = 100,message = "素材ID长度为0~100个字符")
	private String mediaId;
	
	@Length(min = 0,max = 45,message = "标题长度为0~45个字符")
	private String title;
	
	@Length(min = 0,max = 45,message = "描述长度为0~45个字符")
	private String description;
	
	@Length(min = 0,max = 45,message = "地址长度为0~45个字符")
	private String url;
	
	private Double locationX;
	
	private Double locationY;
	
	private Integer scale;
	
	@Length(min = 0,max = 45,message = "标签长度为0~45个字符")
	private String label;
	
	@Length(min = 0,max = 45,message = "缩略图长度为0~45个字符")
	private String thumbMediaId;
	
	@Length(min = 0,max = 45,message = "格式长度为0~45个字符")
	private String format;
	
	@Length(min = 0,max = 1000,message = "语音识别结果长度为0~1000个字符")
	private String recognition;
	
	private Long parentId;
	
	@Length(min = 0,max = 1000,message = "音频长度为0~1000个字符")
	private String musicUrl;
	
	@Length(min = 0,max = 1000,message = "高清音频长度为0~1000个字符")
	private String hqMusicUrl;
	
	@Length(min = 0,max = 1000,message = "文章长度为0~1000个字符")
	private String articles;
	
	@NotNull(message = "类型（收、发）不能为空")
	@Length(min = 0,max = 45,message = "类型（收、发）长度为0~45个字符")
	private String type;
	

}